package com.wolfpire.workflow.om;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 流程参与者表
 * @author liushx
 */

@Entity
@Table(name = "wf_node_actor")
public class NodeActor implements Serializable{
	
	private static final long serialVersionUID = -5021969613977764831L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "PROPERTY_ID", unique = true, nullable = false, length = 16)
	private Long propertyId;
	
	@Column(name = "NODE_ID", length = 8)
	private Long nodeId;
	
	@Column(name = "ACTOR_TYPE")
	private String actorType;
	
	@Column(name = "ACTOR_ID")
	private Long actorId;
	
	@Column(name = "ACTOR_NAME")
	private String actorName;
	
	// 项目申报关联表
    @ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="NODE_ID", insertable=false, updatable=false)
    private Node node;

	public NodeActor(Long propertyId, Long nodeId, String actorType,
			Long actorId, String actorName, Node node) {
		super();
		this.propertyId = propertyId;
		this.nodeId = nodeId;
		this.actorType = actorType;
		this.actorId = actorId;
		this.actorName = actorName;
		this.node = node;
	}

	public NodeActor() {
		super();
		// TODO Auto-generated constructor stub
	}

	public Long getPropertyId() {
		return propertyId;
	}

	public void setPropertyId(Long propertyId) {
		this.propertyId = propertyId;
	}

	public Long getNodeId() {
		return nodeId;
	}

	public void setNodeId(Long nodeId) {
		this.nodeId = nodeId;
	}

	public String getActorType() {
		return actorType;
	}

	public void setActorType(String actorType) {
		this.actorType = actorType;
	}

	public Long getActorId() {
		return actorId;
	}

	public void setActorId(Long actorId) {
		this.actorId = actorId;
	}

	public String getActorName() {
		return actorName;
	}

	public void setActorName(String actorName) {
		this.actorName = actorName;
	}

	public Node getNode() {
		return node;
	}

	public void setNode(Node node) {
		this.node = node;
	}
	
}
